﻿<?php require_once('../Connections/aciitu.php'); ?>
<?php
// Load the common classes
require_once('../includes/common/KT_common.php');

// Load the tNG classes
require_once('../includes/tng/tNG.inc.php');

// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("../");

// Make unified connection variable
$conn_aciitu = new KT_connection($aciitu, $database_aciitu);

//Start Restrict Access To Page
$restrict = new tNG_RestrictAccess($conn_aciitu, "../");
//Grand Levels: Level
$restrict->addLevel("1");
$restrict->addLevel("2");
$restrict->Execute();
//End Restrict Access To Page

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_aciitu, $aciitu);
$query_RsSite = "SELECT * FROM site ORDER BY id_site DESC";
$RsSite = mysql_query($query_RsSite, $aciitu) or die(mysql_error());
$row_RsSite = mysql_fetch_assoc($RsSite);
$totalRows_RsSite = mysql_num_rows($RsSite);

// Make a logout transaction instance
$logoutTransaction = new tNG_logoutTransaction($conn_aciitu);
$tNGs->addTransaction($logoutTransaction);
// Register triggers
$logoutTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "GET", "KT_logout_now");
$logoutTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "login.php");
// Add columns
// End of logout transaction instance

// Make a logout transaction instance
$logoutTransaction1 = new tNG_logoutTransaction($conn_aciitu);
$tNGs->addTransaction($logoutTransaction1);
// Register triggers
$logoutTransaction1->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "GET", "KT_logout_now");
$logoutTransaction1->registerTrigger("END", "Trigger_Default_Redirect", 99, "login.php");
// Add columns
// End of logout transaction instance

// Execute all the registered transactions
$tNGs->executeTransactions();

// Get the transaction recordset
$rscustom = $tNGs->getRecordset("custom");
$row_rscustom = mysql_fetch_assoc($rscustom);
$totalRows_rscustom = mysql_num_rows($rscustom);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.: <?php echo $row_RsSite['site']; ?> | Administração  :.</title>

<link href="../css/css_admin.css" rel="stylesheet" type="text/css" />

  <style type="text/css">
  a.texto_submenu:link {text-decoration: none}
  a.texto_submenu:visited {text-decoration: none}
  a.texto_submenu:hover {
  text-decoration: underline; 
  color: #000000;
  }
  a.texto_submenu:active {text-decoration: none}
  </style>

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #000000;
}
a:link {
	color: 0;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: 0;
}
a:hover {
	text-decoration: none;
	color: 0;
}
a:active {
	text-decoration: none;
	color: 0;
}
.style4 {color: #FFFFFF}
.style6 {color: #333333}
-->
</style>
<script>
function mostraOculta(quem){
  quem = quem.parentNode.getElementsByTagName('div')[0];
  if(quem.style.display=='none'){
    quem.style.display='block';
  }else{
    quem.style.display='none';
  }
}
</script>
<link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="../includes/common/js/base.js" type="text/javascript"></script>
<script src="../includes/common/js/utility.js" type="text/javascript"></script>
<script src="../includes/skins/style.js" type="text/javascript"></script>
</head>

<body oncontextmenu="return false">
     
<table width="161" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="texto_menutop" align="center">
          <a href="index.php" target="_parent">
          <span class="texto_menutop">
          &nbsp;Página Principal</span></a></td>
       </tr>
</table>       


<!--Cliente-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> CLIENTES</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>
<table width="161" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="right">
<a href="Admin_Editar_Tipo_Cliente.php?no_new=1" target="conteudo">
<img src="../imagens/icones/add.png" border="0" title="Inserir Tipo de Cliente" />
</a>
</div>
</td>
<td>
&nbsp;<a href="Admin_Tipo_Cliente.php" target="conteudo">
<span class="texto_submenu">
Ger. Tipos Cliente
</span>
</a>
</td>
</tr>
<tr>
<td>
<div align="right">
<a href="Admin_Editar_Cliente.php?no_new=1" target="conteudo">
<img src="../imagens/icones/add.png" border="0" title="Inserir Cliente" />
</a>
</div>
</td>
<td>
&nbsp;<a href="Admin_Cliente.php" target="conteudo">
<span class="texto_submenu">
Gerenciar Clientes
</span>
</a>
</td>
</tr>
</table>    
</div>  
</div>
<!--Fim Cliente-->  



<!--Projeto-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> IMÓVEIS</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>
<table width="161" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="right">
<a href="Admin_Editar_Tipo_Imovel.php?no_new=1" target="conteudo">
<img src="../imagens/icones/add.png" border="0" title="Inserir Tipo de Imóvel" />
</a>
</div>
</td>
<td>
&nbsp;<a href="Admin_Tipo_Imovel.php" target="conteudo">
<span class="texto_submenu">
Ger. Tipos Imóveis
</span>
</a>
</td>
</tr>
<tr>
<td>
<div align="right">
<a href="Admin_Editar_Tipo_Anuncio.php?no_new=1" target="conteudo">
<img src="../imagens/icones/add.png" border="0" title="Inserir Tipo de Anúncio" />
</a>
</div>
</td>
<td>
&nbsp;<a href="Admin_Tipo_Anuncio.php" target="conteudo">
<span class="texto_submenu">
Ger. Tipos Anúncios
</span>
</a>
</td>
</tr>
<tr>
<td>
<div align="right">
<a href="Admin_Editar_Imovel.php?no_new=1" target="conteudo">
<img src="../imagens/icones/add.png" border="0" title="Inserir Imóvel" />
</a>
</div>
</td>
<td>
&nbsp;<a href="Admin_Imovel.php" target="conteudo">
<span class="texto_submenu">
Gerenciar Imóveis
</span>
</a>
</td>
</tr>
</table>    
</div>  
</div>
<!--Fim Projeto-->  



<!--Linha Pesquisa-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> LINHAS PESQUISA</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>
<table width="161" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="right">
<a href="Admin_Editar_Linha.php?no_new=1" target="conteudo">
<img src="../imagens/icones/add.png" border="0" title="Inserir Linha de Pesquisa" />
</a>
</div>
</td>
<td>
&nbsp;<a href="Admin_Linha.php" target="conteudo">
<span class="texto_submenu">
Ger. Linhas de Pesquisa
</span>
</a>
</td>
</tr>
</table>    
</div>  
</div>
<!--Fim Linha Pesquisa-->  




<!--Pessoa-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> EQUIPE</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>
<table width="161" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="right">
<a href="Admin_Editar_Pessoa.php?no_new=1" target="conteudo">
<img src="../imagens/icones/add.png" border="0" title="Inserir na Equipe" />
</a>
</div>
</td>
<td>
&nbsp;<a href="Admin_Pessoa.php" target="conteudo">
<span class="texto_submenu">
Gerenciar Equipe
</span>
</a>
</td>
</tr>
</table>    
</div>  
</div>
<!--Fim Pessoa-->



<!--Pessoa-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> PUBLICAÇÕES</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>
<table width="161" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="right">
<a href="Admin_Editar_Publicacao.php?no_new=1" target="conteudo">
<img src="../imagens/icones/add.png" border="0" title="Inserir Publicação" />
</a>
</div>
</td>
<td>
&nbsp;<a href="Admin_Publicacao.php" target="conteudo">
<span class="texto_submenu">
Gerenciar Publicações
</span>
</a>
</td>
</tr>
</table>    
</div>  
</div>
<!--Fim Publicação-->



<!--Páginas--> 
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> PÁGINAS</td>
 </tr>
</table>
</span>


<div class='chamadas' style='display: none'>
<table width="161" border="0" cellpadding="0" cellspacing="0">       
<tr>
  <td><div align="right"> <a href="Admin_Editar_Tipo_Pagina.php?no_new=1" target="conteudo">
  <img src="../imagens/icones/add.png" border="0" title="Inserir Tipo Página" /></a>
  </div>
  </td>
  <td>
  &nbsp;<a href="Admin_Tipo_Pagina.php" class="texto_submenu" target="conteudo">
  <span class="texto_submenu">
  Ger. Tipo Página
  </span>
  </a>
  </td>
</tr>
<tr>
  <td><div align="right"> <a href="Admin_Editar_Pagina.php?no_new=1" target="conteudo"> <img src="../imagens/icones/add.png" border="0" title="Inserir Página" /></a> </div></td>
  <td>
  &nbsp;
  <a href="Admin_Pagina.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Páginas
  </span>
  </a>
  </td>
</tr>
</table> 
</div>
</div>
<!--Fim Páginas-->



<!--Agenda--> 
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> AGENDA</td>
 </tr>
</table>
</span>


<div class='chamadas' style='display: none'>
<table width="161" border="0" cellpadding="0" cellspacing="0">       
<tr>
  <td><div align="right"> <a href="Admin_Editar_Agenda.php?no_new=1" target="conteudo"> <img src="../imagens/icones/add.png" border="0" title="Inserir Evento" /></a> </div></td>
  <td>
  &nbsp;
  <a href="Admin_Agenda.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Eventos
  </span>
  </a>
  </td>
</tr>
</table> 
</div>
</div>
<!--Fim Agenda-->



<!--Anexo--> 
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> ANEXO</td>
 </tr>
</table>
</span>


<div class='chamadas' style='display: none'>
<table width="161" border="0" cellpadding="0" cellspacing="0">       
<tr>
  <td><div align="right"> <a href="Admin_Editar_Anexo.php?no_new=1" target="conteudo"> <img src="../imagens/icones/add.png" border="0" title="Inserir Evento" /></a> </div></td>
  <td>
  &nbsp;
  <a href="Admin_Anexo.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Anexos
  </span>
  </a>
  </td>
</tr>
</table> 
</div>
</div>
<!--Fim Anexo-->




<!--Banner--> 
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> BANNERS</td>
 </tr>
</table>
</span>


<div class='chamadas' style='display: none'>
<table width="161" border="0" cellpadding="0" cellspacing="0">       
<tr>
  <td><div align="right"> <a href="Admin_Editar_Banner.php?no_new=1" target="conteudo"> <img src="../imagens/icones/add.png" border="0" title="Inserir Banner" /></a> </div></td>
  <td>
  &nbsp;
  <a href="Admin_Banner.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Banners
  </span>
  </a>
  </td>
</tr>
</table> 
</div>
</div>
<!--Fim Banner-->


<!--Logotipos-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> PARCEIROS</td>
 </tr>
</table>
</span>


<div class='chamadas' style='display: none'>
<table width="161" border="0" cellpadding="0" cellspacing="0">       
<tr>
  <td><div align="right"> <a href="Admin_Editar_Logotipo.php?no_new=1" target="conteudo"> <img src="../imagens/icones/add.png" border="0" title="Inserir Parceiro" /></a> </div></td>
  <td>
  &nbsp;
  <a href="Admin_Logotipo.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Parceiros
  </span>
  </a>
  </td>
</tr>
</table> 
</div>
</div>
<!--Fim Logotipos-->




<!--Galeria-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>      
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">      
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> GALERIA FOTOS</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>  
<table width="161" border="0" cellspacing="0" cellpadding="0">  
 <tr>
  <td>
   <div align="right">
   <a href="Admin_Editar_Galeria.php?no_new=1" target="conteudo">
   <img src="../imagens/icones/add.png" border="0" title="Inserir Galeria de Fotos" />
   </a>
   </div>
  </td>
  <td>
  &nbsp;<a href="Admin_Galeria.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Galerias
  </span>
  </a>
  </td>
 </tr>
</table>
</div>
</div>
<!--Fim Galeria-->




<!--Videos-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>      
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">      
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> CANAL DE VÍDEOS</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>  
<table width="161" border="0" cellspacing="0" cellpadding="0">  
 <tr>
  <td>
   <div align="right">
   <a href="Admin_Editar_Video.php?no_new=1" target="conteudo">
   <img src="../imagens/icones/add.png" border="0" title="Inserir Vídeo" />
   </a>
   </div>
  </td>
  <td>
  &nbsp;<a href="Admin_Video.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Vídeos
  </span>
  </a>
  </td>
 </tr>
</table>
</div>
</div>
<!--Fim Videos-->






<!--Usuario-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>       
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">        
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> USUÁRIOS</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>  
<table width="161" border="0" cellspacing="0" cellpadding="0">        
 <tr>
  <td>
   <div align="right">
   <a href="Admin_Editar_User.php?no_new=1" target="conteudo">
   <img src="../imagens/icones/add.png" border="0" title="Inserir Usuario" />
   </a>
   </div>
  </td>
  <td>
  &nbsp;<a href="Admin_User.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Usuário
  </span>
  </a>
  </td>
 </tr>
</table>
</div>
</div>
<!--Usuario-->



<!--Config-->
<div class='cliente1'>
<span onclick='mostraOculta(this)'>      
<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;"> 
 <tr>
  <td width="10" height="25">&nbsp;</td>
  <td class="texto_menu">&nbsp;<span class="texto_barra">|</span> CONFIGURAÇÕES</td>
 </tr>
</table>
</span>

<div class='chamadas' style='display: none'>  
<table width="161" border="0" cellspacing="0" cellpadding="0">       
 <tr>
  <td>
  <div align="right">
  <a href="Admin_Editar_Rodape.php?id_rodape=1" target="conteudo">
  <img src="../imagens/icones/add.png" border="0" title="Gerenciar Rodapé do Site" />
  </a>
  </div>
  </td>
  <td>
  &nbsp;<a href="Admin_Rodape.php" target="conteudo">
  <span class="texto_submenu">
  Gerenciar Rodapé
  </span>
  </a>
  </td>
 </tr>
      
 <tr>
  <td>
   <div align="right">
   <a href="Admin_Editar_Titulo.php?id_titulo=1" target="conteudo" title="Sair do Sistema">
   <img src="../imagens/icones/add.png" border="0" title="Gerenciar Título do Site" />
   </a>
   </div>
  </td>
  <td>
  &nbsp;<a href="Admin_Titulo.php" target="conteudo">
  <span class="texto_submenu">
  Ger. Título
  </span>
  </a>
  </td>
 </tr>
</table>
</div>
</div>
<!--Config-->

<br>

<table width="161" border="0" cellspacing="0" cellpadding="0" background="../imagens/fundo_menu_admin.png" style="background-repeat:no-repeat;">        
      <tr>
        <td width="35" align="center"><div align="center"><a href="<?php echo $logoutTransaction1->getLogoutLink(); ?>"><img src="../imagens/icones/sair.png" width="24" height="24" border="0" /></a></div></td>
        <td width="120" align="left">&nbsp;
          <?php
	echo $tNGs->getErrorMsg();
?>
        <strong>
        <a href="<?php echo $logoutTransaction->getLogoutLink(); ?>" target="_parent" title="Sair do Sistema">
        <span class="sair_menu">
        SAIR
        </span>
        </a>
        </strong>
        </td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result($RsSite);
?>
